(bug 42941) Add $CHANGEDORCREATED back for custom template
authorbsitu <bsitu@wikimedia.org>
Tue, 18 Dec 2012 02:39:30 +0000 (18:39 -0800)
committerMatmaRex <matma.rex@gmail.com>
Fri, 11 Jan 2013 12:14:13 +0000 (13:14 +0100)
1. Add $CHANGEDORCREATED back so custom template with this variable won't break.
   Scheduled for removal in MediaWiki 1.23.
2. change escaped() to text() since this is just plain text email and client
   will interpret it as plain text

Change-Id: I7d9fd90519a68dd66f99479a7c92f6c664485a9c

RELEASE-NOTES-1.21
includes/UserMailer.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index 7ea3e87..f19a1b0 100644 (file)
@@ -60,7 +60,7 @@ production.
   debug mode: wfMsg, wfMsgNoTrans, wfMsgForContent, wfMsgForContentNoTrans,
   wfMsgReal, wfMsgGetKey, wfMsgHtml, wfMsgWikiHtml, wfMsgExt, wfEmptyMsg. Use
   the Message class, or the global method wfMessage.
-* Added $wgEnableCanonicalServerLink, off by default. If enabled, a 
+* Added $wgEnableCanonicalServerLink, off by default. If enabled, a
   <link rel=canonical> tag is added to every page indicating the correct server
   to use.
 * Debug message emitted by wfDebugLog() will now be prefixed with the group
@@ -121,7 +121,9 @@ production.
 * (bug 14901) Email notification mistakes log action for new page creation.
   Enotif no longer sends "page has been created" notifications for some log
   actions. The following events now have a correct message: page creation,
-  deletion, move, restore (undeletion), change (edit).
+  deletion, move, restore (undeletion), change (edit). Parameter
+  $CHANGEDORCREATED is deprecated in 'enotif_body' and scheduled for removal in
+  MediaWiki 1.23.
 * (bug 457) In the sidebar of Vector, CologneBlue, Monobook, and Monobook-based
   skins, the heading levels have been changed from (variously per skin)
   <h4>, <h5> or <h6> to only <h3>s, with a <h2> hidden heading above them.
index cb7afc0..324e7ce 100644 (file)
@@ -715,10 +715,14 @@ class EmailNotification {
                                        ->inContentLanguage()->text();
                        }
                        $keys['$OLDID']   = $this->oldid;
+                       // @deprecated Remove in MediaWiki 1.23.
+                       $keys['$CHANGEDORCREATED'] = wfMessage( 'changed' )->inContentLanguage()->text();
                } else {
                        # clear $OLDID placeholder in the message template
                        $keys['$OLDID']   = '';
                        $keys['$NEWPAGE'] = '';
+                       // @deprecated Remove in MediaWiki 1.23.
+                       $keys['$CHANGEDORCREATED'] = wfMessage( 'created' )->inContentLanguage()->text();
                }
 
                $keys['$PAGETITLE'] = $this->title->getPrefixedText();
@@ -746,11 +750,11 @@ class EmailNotification {
 
                # Now build message's subject and body
                $this->subject = wfMessage( 'enotif_subject_' . $this->pageStatus )->inContentLanguage()
-                       ->params( $pageTitle, $keys['$PAGEEDITOR'] )->escaped();
+                       ->params( $pageTitle, $keys['$PAGEEDITOR'] )->text();
 
                $keys['$PAGEINTRO'] = wfMessage( 'enotif_body_intro_' . $this->pageStatus )
                        ->inContentLanguage()->params( $pageTitle, $keys['$PAGEEDITOR'], $pageTitleUrl )
-                       ->escaped();
+                       ->text();
 
                $body = wfMessage( 'enotif_body' )->inContentLanguage()->plain();
                $body = strtr( $body, $keys );
index c061d30..c901238 100644 (file)
@@ -2919,6 +2919,8 @@ $UNWATCHURL
 
 Feedback and further assistance:
 {{canonicalurl:{{MediaWiki:Helppage}}}}',
+'created'                      => 'created', # only translate this message to other languages if you have to change it
+'changed'                      => 'changed', # only translate this message to other languages if you have to change it
 
 # Delete
 'deletepage'             => 'Delete page',
index 5eb2191..9094ee1 100644 (file)
@@ -4284,6 +4284,8 @@ See also:
 * $1 is a link to a diff, shown as a plain link.',
 'enotif_anon_editor' => 'User name in an e-mail notification when referring to an anonymous user. Parameters:
 * $1 is the anonymous user name (i.e. an IP address).',
+'created' => '{{optional}} Deprecated message. Possible value for $CHANGEDORCREATED in {{msg|enotif_body}}.',
+'changed' => '{{optional}} Deprecated message. Possible value for $CHANGEDORCREATED in {{msg|enotif_body}}.',
 'enotif_body' => 'Text of a notification e-mail sent when a watched page has been edited or deleted.[[File:Screenshot_MediaWiki_e-mail_notifier.PNG|150px|right]]
 
 *$WATCHINGUSERNAME is the username of the user receiving the notification.
index f53cf91..87bc1c2 100644 (file)
@@ -483,6 +483,8 @@ $wgOptionalMessages = array(
        'categoryviewer-pagedlinks',
        'undelete-revisionrow',
        'pageinfo-redirects-value',
+       'created', // @deprecated. Remove in MediaWiki 1.23.
+       'changed', // @deprecated. Remove in MediaWiki 1.23.
 );
 
 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
index c895bde..50a6f2e 100644 (file)
@@ -1960,6 +1960,8 @@ $wgMessageStructure = array(
                'enotif_lastdiff',
                'enotif_anon_editor',
                'enotif_body',
+               'created',
+               'changed',
        ),
        'delete' => array(
                'deletepage',